package com.example.redismanual.controller;

import com.example.redismanual.dao.RedisStringDao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.script.RedisScript;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

/* 类注解 */
@Api(value = "desc of class")
@RestController
public class RedisOpsContorller {

      @Autowired
      RedisStringDao redisStringDao;

      /* set string api */
      @ApiOperation(value = "set string value api", notes = "")
      @GetMapping(value="/setString")
      public void hello( /* 参数注解 */ @ApiParam(value = "key" , required=true ) @RequestParam String key, @ApiParam(value = "value" , required=true ) @RequestParam String value) {
          redisStringDao.setStringValue(key, value);
      }
}
